import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/', //首页
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Index',
    component: () => import('@/views/index'),
    meta: {
      isShow: true
    }
  },
  {
    path: '/video/:id', //视频详情页
    name: 'video',
    component: () => import('@/views/video')
  },
  {
    path: '/product/:id', //产品详情页
    name: 'product',
    component: () => import('@/views/product')
  },
  {
    path: '/allevaluate/:id', //所有好评
    name: 'allevaluate',
    component: () => import('@/views/product/allevaluate')
  },
  {
    path: '/myCloud', //我的云仓
    name: 'myCloud',
    component: () => import('@/views/myCloud')
  },
  {
    path: '/deliveryConfirmat', //我的云仓---提货
    name: 'deliveryConfirmat',
    component: () => import('@/views/myCloud/deliveryConfirmat')
  },
  {
    path: '/join', //加盟咨询代理
    name: 'join',
    component: () => import('@/views/join')
  },
  {
    path: '/consult', //资讯
    name: 'consult',
    component: () => import('@/views/consult')
  },
  {
    path: '/agency', //加盟咨询代理
    name: 'agency',
    component: () => import('@/views/agency')
  }
]

const router = new VueRouter({
  routes
})

export default router
